import ajax from './index'

export function shopTypeList(condition) {
}
export function shoptypeopenorclose(condition) {
}
export function shoptypeaddormodify(condition) {
}
export function shopcategoryopenorclose(condition) {
}
export function shopcategorydel(condition) {
}
export function shopcategoryaddormodify(condition) {
}
export function shopCategoryList(condition) {
}
export function seller_list(condition) {
  if (!condition) {
    condition = {
      pageNum: 1,
      pageSize: 100
    }
  }
  return ajax({
    url: "/backend/seller/list",
    method: "get",
    params: condition
  });
}

export function seller_save(param) {
  return ajax({
    url: "/backend/seller/save",
    method: "post",
    data: param
  });
}
export function seller_detail(id) {
  return ajax({
    url: "/backend/seller/detail/" + id,
    method: "get"
  });
}
export function seller_del(id) {
  return ajax({
    url: "/backend/seller/delete?ids=" + id,
    method: "post"
  });
}
export function seller_check2(id) {
  return ajax({
    url: "/backend/seller/check2?ids=" + id,
    method: "post"
  });
}
export function seller_refuse(id) {
  return ajax({
    url: "/backend/seller/refuse?ids=" + id,
    method: "post"
  });
}

export function seller_money_record_list(condition) {
  if (!condition) {
    condition = {
      pageNum: 1,
      pageSize: 100
    }
  }
  return ajax({
    url: "/backend/seller/money_record_list",
    method: "get",
    params: condition
  });
}

export function seller_recharge(param) {
  return ajax({
    url: "/backend/seller/recharge",
    method: "post",
    data: param
  });
}

export function seller_order_create(param) {
  return ajax({
    url: "/backend/seller/order_create",
    method: "post",
    data: param
  });
}
export function seller_order_list(condition) {
  if (!condition) {
    condition = {
      pageNum: 1,
      pageSize: 100
    }
  }
  return ajax({
    url: "/backend/seller/orderList",
    method: "get",
    params: condition
  });
}

export function seller_order_detail(id) {
  return ajax({
    url: "/backend/seller/orderDetail/" + id,
    method: "get"
  });
}

export function seller_order_pay(param) {
  return ajax({
    url: "/backend/seller/orderPay",
    method: "post",
    data: param
  });
}

export function seller_check(param) {
  return ajax({
    url: "/backend/seller/check",
    method: "post",
    data: param
  });
}

// 小店申请审核根据传入的状态变更审核状态
export function sellerChecked(condition, url) {
  return ajax({
    url: `/backend/seller/check?${url}`,
    method: 'POST',
    data: condition
  });
}

// 店铺详情
export function shopEnterManagerDetailData(id) {
  return ajax({
    url: `/backend/seller/detail/${id}`,
    method: 'get'
  });
}
